<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.springframework.org/schema/jdbc">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <title>教师首页</title>
    <!-- <link rel="stylesheet" th:href="@{../css/bootstrap.css}" href="../static/css/bootstrap.css"> -->
    <link rel="stylesheet" th:href="@{../css/teacher_index.css}" href="../static/css/teacher_index.css">
</head>
<body class="container">
    <header>
        <span>首页</span>
        <form>
            <input type="text" placeholder="请输入搜索内容">
        </form>
        <div style="margin-left: auto">
                <image  style="height: 20px;width: 20px" src="../static/img/touxiang.jpg"  th:src="@{~/img/touxiang.jpg}" ></image>
                <span style="margin: 0" th:text="${user_name}">名字</span>
        </div>
       
    </header>
    <section class="body_section">
        <aside class="body_left">
            <div class="left_div">
                <image class="left_touxiang" src="../static/img/touxiang.jpg" th:src="@{~/img/touxiang.jpg}">
                </image>
                <p th:text="${user_name}">
                    名字
                </p>    
                <ul>
                    <li>课堂</li>
                    <li>通知</li>
                    <li>专题创作</li>
                    <li>笔记</li>
                    <li>电脑同步云盘</li>
                    <li>调查问卷</li>
                </ul>
                <p>
                    管理应用
                </p>
                <image class="left_erweima" src="../static/img/erweima.png"  th:src="@{~/img/erweima.png}">
                       
                </image>
                <p>扫一扫下载应用</p>
            </div>
        </aside>
        <section class="body_right">
            <div class="right_head">
                <span>我学的课|</span>
                <span>我教的课</span>
                <span style="float: right;">
                    <a  th:href="@{/teacher/To_add_course}">添加课程</a>
                </span>
            </div>
           <hr style="border: 1px solid black">
           <div class="right_content">
              <ul id="all_course">
                  <li th:each="course:${teacher_class}">
                      <image class="right_img" src="../static/img/course.png" th:src="@{~/uploadfile/{filename}(filename=${course.courseImage})}"></image>
                      <!--thymeleaf的坑 拼接图片地址-->
                      <h2 th:text="${course.courseName}">java课程实践基础</h2>
                      <h2 th:text="${course.courseImage}">java课程实践基础</h2>
                      <span id="spantest" hidden th:text="${course.id}">-1</span>
                      <p>
                          <span th:text="${user_name}">老师名字</span>
                      </p>
                  </li>
              </ul>
           </div>
        </section>
    </section>
    <footer>
           <p style="text-align: center">Copyright ©	杭州电子科技大学信息工程学院</p>
    </footer>

    <script th:src="@{/js/jquery-3.3.1.js}" src="../static/js/jquery-3.3.1.js"></script>
    <script th:src="@{/js/bootstrap.js}" src="../static/js/bootstrap.js"></script>
    <script type="text/javascript">
    	$(function(){
    		$("#all_course").on("click","li",function(){
    			// console.log($(this).find("."))
    			var s=$(this).find("#spantest").html();
    			// s 课程的id
    			alert(s);
                window.location.href=("/modified_course?course_code="+s);
                //location弊端get当时提交数据泄露
    		});
    	})
    </script>
</body>
</html>